<?php
require 'authorControl.php';
$book = new gbookModel();
$book->setBookPath('book.txt');
$page = $book->getTotalPage();
?>
<html>
<head>
    <title></title>
    <style>
        label input,textarea{
            width: 300px;
            height: 30px;
            margin: 10px 10px 10px 10px;
        }
        textarea{
            height: 100px;
        }
        .page_e{
            padding: 10px;
            text-align: center;
            background: #3498db;
            display: inline-block;
            margin-top: 10px;
            text-decoration: none;
            margin-left: 5px;
            color: #ffffff;
        }
        .page_checked{
            background: #2c3e50;
        }
        .info_line{
            display: block;
            background: #95a5a6;
            color:#000000 ;
        }
    </style>
</head>
    <body>
    <form action="bookDo.php?page=<?php echo $page;?>" method="post">
        <label for="name">
            <input type="text" name="name" placeholder="请输入用户名">
        </label>
        <br>
        <label for="email">
            <input type="text" name="email" placeholder="请输入邮箱">
        </label>
        <br>
        <label for="email">
            <textarea name="content" id="content" cols="30" rows="10"></textarea>
        </label>
        <input type="submit" value="提交留言">
    </form>
    </body>
</html>

<?php
echo $book->readByPage();
?>
